package com.dnjn.happiness.biz.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dnjn.happiness.common.core.annotation.Excel;
import com.dnjn.happiness.common.core.web.domain.BaseEntity;
import com.dnjn.happiness.system.api.domain.SysUser;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.time.LocalDate;
import java.util.List;

/**
 * appraise对象 biz_appraise
 *
 * @author amber
 * @date 2023-10-20
 */
@Schema(name = "Appraise", description = "appraise")
@Accessors(chain = true)
@Getter
@Setter
@TableName("biz_appraise")
public class Appraise extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** PK */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "appraise_id", type = IdType.ASSIGN_ID)
    private Long appraiseId;

    
    


    /** 发起人 */
    @Schema(description = "发起人")
    @Excel(name = "发起人")
    private Long fromUserId;

    /**
     * 发起人部门Id
     */
    @TableField(exist = false)
    private Long fromUserDeptId;

    @TableField(exist = false)
    private String fromUserDeptName;

    /** 被评人 */
    @Schema(description = "评价对象(被评价人)")
    @Excel(name = "评价对象(被评价人)")
    private Long userId;

    /**
     * 被评人部门Id
     */
    @TableField(exist = false)
    private Long userDeptId;

    @TableField(exist = false)
    private String userDeptName;


    /** Y-N */
    @Schema(description = "是否匿名")
    @Excel(name = "是否匿名")
    private Character isAnonymous;

    /** 评价内容 */
    @Schema(description = "评价内容")
    @Excel(name = "评价内容")
    private String text;

    /**  */
    @Schema(description = "")
    @Excel(name = "")
    private Long siteId;

    /** $column.columnComment */
    @Schema(description = "${comment}")
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long appraiseTagsId;

    /** $column.columnComment */
    @Schema(description = "${comment}")
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long etypeId;

    /** 是否删除|0-否 1-是|valid */
    @Schema(description = "是否删除|0-否 1-是|valid")
    @Excel(name = "是否删除|0-否 1-是|valid")
    private String deleted;

    private String appraiseType;
    @Schema(description = "多维度评价级别")
    private String grade;



    private Integer likeCounts;

    /**/
    @TableField(exist = false)
    private String label;

    @TableField(exist = false)
    private String etype;

    @TableField(exist = false)
    private String score;

    @TableField(exist = false)
    private String startTime;

    @TableField(exist = false)
    private String endTime;



    @TableField(exist = false)
    @Schema(description = "评价对象(被评价人)姓名")
    private String userName;

    @TableField(exist = false)
    @Schema(description = "发起人姓名")
    private String fromUserName;
    @Schema(description = "头像")
    @TableField(exist = false)
    private String avatar;

    @TableField(exist = false)
    private String userAvatar;

    @TableField(exist = false)
    private LocalDate currDate;

    @TableField(exist = false)
    private List<AppraiseXref> xrefList;

    @Schema(description = "团队人员user_id")
    @TableField(exist = false)
    private List<Long> teamUserIds;

    @Schema(description = "团队team_id")
    @TableField(exist = false)
    private Long teamId;

    @TableField(exist = false)
    private SysUser sysUser;

    @TableField(exist = false)
    private String  sysTeamName;
    @TableField(exist = false)
    private Long deptId;

    /**
     * 是否查看所有
     */
    @TableField(exist = false)
    private Boolean whetherAllPermissions;

//
//    @Schema(description = "发起人姓名")
//    @TableField(exist = false)
//    private String fromNickName;
//    @Schema(description = "被评价人姓名")
//    @TableField(exist = false)
//    private String nickname;
//

}
